<?php
require_once 'zeka.php';  //$conn
header("content-type:text/html;charset=utf-8");
$id = $_POST['id'];
$sid = intval($id);  

$username = $_POST['username'];
$sex = $_POST['sex'];
$message = $_POST['message'];
$imgurl = $_POST['imgurl'];
$time_at = time();


$sql = "
UPDATE t_message 
SET  
username = '$username', 
sex = '$sex',    
content =  '$message',
avater = '$imgurl',
time_at = $time_at
WHERE  id =$id 
LIMIT 1 ; 
";
//echo $sql;
//die;
$result = $conn->query($sql);
print_r($result);

       

/*
 * 
UPDATE lin127.t_message
SET
username = $username, 
sex = $sex, 
content = $message,
avater = $imgurl,
time_at = $time_at,    
 */